#ifndef KALMAN_H__
#define KALMAN_H__

#include "base.h"



typedef struct
{
	float x_last;//=0;
	float p_last;//=0.02;
	float Q;//=0.018;
	float R;//=0.542;
	float kg;
	float x_mid;
	float x_now;
	float p_mid;
	float p_now;
	
}kalman_struct;




int kalman_init(kalman_struct *k);

float kalman_filter(kalman_struct *k,float now);







#endif


